export default {
	getGoodStatus(store, json){
		return new Promise((resolve, reject) => {
			store.dispatch('requestData', {
				path:"/good",
				data:json
			}).then(res => {
				resolve(res)
			}).catch(err => {
				reject(err)
			})
		})
	},
	addGood(store, json){
		return new Promise((resolve, reject) => {
			store.dispatch('requestData', {
				path:"/good/add",
				data:json
			}).then(res => {
				resolve(res)
			}).catch(err => {
				reject(err)
			})
		})
	},
	deleteGood(store, json){
		return new Promise((resolve, reject) => {
			store.dispatch('requestData', {
				path:"/good/delete",
				data:json
			}).then(res => {
				resolve(res)
			}).catch(err => {
				reject(err)
			})
		})
	},
	getGoodAvatarsData(store, json){
		return new Promise((resolve, reject) => {
			store.dispatch('requestData', {
				path:"/good/users",
				data:json
			}).then(res => {
				resolve(res)
			}).catch(err => {
				reject(err)
			})
		})
	}
}